Apparatus and method for adaptive context switching scheduling scheme for fast block input and output

ABSTRACT

Provided is a method and apparatus for an adaptive context switching for a fast block input/output. The adaptive context switching method may include: requesting, by a process, an input/output device to perform an input/output of data; comparing a Central Processing Unit (CPU) effectiveness based on whether the context switching is performed; and performing the input/output through the context switching to a driver context of the input/output device, or directly performing, by the process, the input/output based on a comparison result of the CPU effectiveness.

CROSS REFERENCE TO RELATED APPLICATIONS

This patent application is a continuation of pending PCT Application No.PCT/KR2009/006992, filed Nov. 25, 2009, which claims the benefit ofKorean Application No. 10-2008-0118331, filed Nov. 26, 2008, the entireteachings and disclosure of which are incorporated herein by referencethereto.

FIELD OF THE INVENTION

The present invention relates to a method and apparatus for an adaptivecontext switching for a fast block input/output, and more particularly,to a method and apparatus for appropriately performing a contextswitching based on a change of hardware by determining whether toperform an input/output through the context switching or to directlyperform the input/output using a process.

BACKGROUND OF THE INVENTION

In a conventional art, when a process executes an input/output, aperformance of a block input/output device is slow compared to a CentralProcessing unit (CPU) or a memory. Therefore, to decrease a bottleneckeffect of the block input/output device, an input/output scheduler mayallocate the CPU to another process, and execute the process havingrequested the input/output after a device driver completes a blockcalculation. In this instance, although a context switching functionshould be used to enhance the entire system performance, an overload onthe CPU may occur when the context switching is performed.

With developments in a memory industry, an input/output speed of amemory-based block input/output device is very fast compared to a harddisk and may become much faster. Specifically, in a particularsituation, to not perform the context switching may become a gain inaspects of an input/output response speed and a system performance.

Accordingly, there is a need for a method and apparatus for a contextswitching that may determine whether a context switching is to beperformed to enhance a system performance, and thereby selectivelyperform the context switching as necessary.

SUMMARY OF THE INVENTION

An aspect of the present invention provides a method and apparatus foran adaptive context switching that, when a predetermined condition issatisfied, may not perform a context switching when a process executesan input/output and thereby enables a quick response on the side of theprocess having requested the input/output.

Another aspect of the present invention provides a method and apparatusfor an adaptive context switching that may determine whether a contextswitching is performed based on a CPU effectiveness, when a processexecutes an input/output, and thereby may enhance a use effectiveness ofa CPU.

According to an aspect of the present invention, there is provided amethod for an adaptive context switching for a fast block input/output,the method including: requesting, by a process, an input/output deviceto perform an input/output of data; comparing a Central Processing Unit(CPU) effectiveness based on whether the context switching is performed;and performing the input/output through the context switching to adriver context of the input/output device, or directly performing, bythe process, the input/output based on a comparison result of the CPUeffectiveness.

The method may further include determining whether the input/outputdevice corresponds to a fast block device. When the input/output devicecorresponds to the fast block device, the comparing through theperforming of the input/output may be performed.

The comparing may include comparing the CPU effectiveness according to afirst input/output operation where the process having requested theinput/output directly performs the input/output, and the CPUeffectiveness according to a second input/output operation where theinput/output is performed through the context switching to the drivercontext of the input/output device.

The performing of the input/output may include performing the firstinput/output operation when the CPU effectiveness according to the firstinput/output operation is greater than the CPU effectiveness accordingto the second input/output operation, and performing the secondinput/output operation when the CPU effectiveness according to thesecond input/output operation is greater than the CPU effectivenessaccording to the first input/output operation.

The comparing may include calculating and comparing the CPUeffectiveness based on an amount of time used for the input/output, andan amount of time used for allocating a CPU to the process and therebyprocessing the calculation.

The method may further include verifying whether the input/output deviceuses a Direct Memory Access (DMA).

The performing of the input/output may include: determining whether arequest in a response standby state exists in a queue of theinput/output device; and performing the input/output through the contextswitching to the driver context of the input/output device when therequest exists.

According to another aspect of the present invention, there is providedan apparatus for an adaptive context switching for a fast blockinput/output, the apparatus including: an input/output request unit torequest, by a process, an input/output device to perform an input/outputof data; a CPU effectiveness comparison unit to compare a CPUeffectiveness based on whether the context switching is performed; andan input/output performing unit to perform the input/output through thecontext switching to a driver context of the input/output device, ordirectly performing, by the process, the input/output based on acomparison result of the CPU effectiveness.

The apparatus may further include a DMA utilization verifying unit toverify whether the input/output device uses a DMA. The CPU effectivenesscomparison unit may include: a CPU effectiveness calculation unit tocalculate the CPU effectiveness according to a first input/outputoperation where the process having requested the input/output directlyperforms the input/output, and the CPU effectiveness according to asecond input/output operation where the input/output is performedthrough the context switching to the driver context of the input/outputdevice; and an effectiveness comparison unit to compare the CPUeffectiveness according to the first input/output operation with the CPUeffectiveness according to the second input/output operation.

The CPU effectiveness calculation unit may include: a first CPUeffectiveness calculation unit to calculate the CPU effectivenessaccording to the first input/output operation and the CPU effectivenessaccording to the second input/output operation, when the input/outputdevice does not use the DMA; and a second CPU effectiveness calculationunit to calculate the CPU effectiveness according to the firstinput/output operation and the CPU effectiveness according to the secondinput/output operation, when the input/output device uses the DMA.

According to embodiments of the present invention, there may be provideda method and apparatus for an adaptive context switching that, when apredetermined condition is satisfied, may not perform a contextswitching when a process executes an input/output and thereby enables aquick response on the side of the process having requested theinput/output.

Also, according to embodiments of the present invention, there may beprovided a method and apparatus for an adaptive context switching thatmay determine whether a context switching is performed based on a CPUeffectiveness, when a process executes an input/output, and thereby mayenhance a use effectiveness of a CPU.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a flowchart illustrating a method for an adaptive contextswitching for a fast block input/output according to an embodiment ofthe present invention;

FIG. 2 is a flowchart illustrating a process of performing aninput/output process based on whether a context switching is performedaccording to an embodiment of the present invention;

FIG. 3 is a diagram illustrating a flow of different times needed when acontext switching is performed according to an embodiment of the presentinvention;

FIG. 4 is a diagram illustrating a flow of different times needed whenan input/output is directly performed without performing a contextswitching according to an embodiment of the present invention;

FIG. 5 is a block diagram illustrating a configuration of an apparatusfor an adaptive context switching for a fast block input/outputaccording to an embodiment of the present invention; and

FIG. 6 is a block diagram illustrating a configuration of a CPUeffectiveness comparison unit of FIG. 5.

DETAILED DESCRIPTION OF THE INVENTION

Reference will now be made in detail to embodiments of the presentinvention, examples of which are illustrated in the accompanyingdrawings, wherein like reference numerals refer to the like elementsthroughout. The embodiments are described below in order to explain thepresent invention by referring to the figures.

FIG. 1 is a flowchart illustrating a method for an adaptive contextswitching for a fast block input/output according to an embodiment ofthe present invention.

In operation S110, a process may request an input/output device toperform an input/output of data. Specifically, when the process havingrequested the input/output desires to input or output the data, theprocess may request the input/output of the data. Hereinafter, a datainput/output operation will be described based on, for example, a dataread operation.

The method for the adaptive context switching for the fast blockinput/output may further include verifying whether the input/outputdevices uses a Direct Memory Access (DMA). The DMA denotes a hardwaremechanism that allows a memory to directly transmit and receiveinput/output data without using a main Central Processing Unit (CPU) ina block input/output. At least one of an input/output response time anda CPU effectiveness may be considered to determine whether the contextswitching is performed. Here, the CPU effectiveness may be differentlycalculated with respect to a case where the DMA is used and a case wherethe DMA is not used. Accordingly, whether the DMA is used may beinitially verified.

In operation S120, the CPU effectiveness may be compared based onwhether the context switching is performed. Specifically, based onwhether the context switching is performed, it is possible to comparethe CPU effectiveness according to a first input/output operation wherethe process having requested the input/output directly performs theinput/output, and the CPU effectiveness according to a secondinput/output operation where the input/output is performed through thecontext switching to a driver context of the input/output device.

An operation of calculating the input/output response time and the CPUeffectiveness will be further described with reference to FIGS. 3 and 4.

FIG. 3 is a diagram illustrating a flow of different times needed when acontext switching is performed according to an embodiment of the presentinvention.

FIG. 3 shows an amount of time used for each of a process 310 havingrequested an input/output, a third process 320, and an input/outputdevice 330 when the input/output is performed through the contextswitching. In FIG. 3, Tc denotes an amount of time used for the contextswitching and Tw denotes an amount of response standby time until aninterrupt is received from the input/output device 330. Tw includes Toand Td. To may include at least one of an input/output command processtime, a seek time, and a rotation delay time. Td denotes an amount oftime used to read data from a physical disk, and to transmit the readdata to a buffer cache. Tb denotes an amount of time used to transmitthe data from a buffer cache of a disk to a memory via a bus. Atemporally overlapping interval may occur between Td and To. Thetemporally overlapping interval may be defined as Tv. Specifically, Tvmay correspond to an overlapping interval that may occur during aprocess of generating the interrupt and transmitting the data to thememory via the bus in a state where a data transmission is notcompleted, when transmitting the data from the disk to the buffer cache.The process 310 having requested the input/output may be in a sleepstate until the data transmission is entirely completed. When the datatransmission is completed, a scheduler may wake the process 310 in thesleep state whereby an operation may proceed. An amount of time used forthe process 310 having requested the input/output to enter the sleepstate and be awaken is referred to as the amount of input/outputresponse time. An example of the input/output response time when thecontext switching is performed may be expressed by the followingEquation 1:R _(cs) =T _(w) +T _(b)+2·T _(c) −T _(v)  [Equation 1]

FIG. 4 is a diagram illustrating a flow of different times needed when aprocess 410 having requested an input/output directly performs theinput/output without performing a context switching according to anembodiment of the present invention. For a period of time correspondingto Tw−Tv without performing the context switching, the process 410 maybe waiting until a data transmission preparation interrupt is receivedfrom a disk, and may transmit data during a period of time correspondingto Td using a CPU. Accordingly, an input/output response time when theprocess 410 having requested the input/output directly performs theinput/output may be expressed by the following Equation 2:R _(acs) =T _(w) +T _(b) −T _(v)  [Equation 2]

Based on a comparison between the above Equation 1 and Equation 2, itcan be known that, when the process 410 directly performs theinput/output, an amount of time of 2×Tc may be saved. However, when theprocess 410 directly performs the input/output, the CPU may not allocatean amount of time corresponding to Tw−Tv to another process. Therefore,it is possible to additionally review a CPU effectiveness. Accordingly,the CPU effectiveness may be expressed by the following Equation 3:

$\begin{matrix}{E = \frac{T_{r}}{T_{io}}} & \lbrack {{Equation}\mspace{14mu} 3} \rbrack\end{matrix}$

Tio denotes an input/output response time used until the input/output iscompleted, and Tr denotes an actual amount of time a CPU is allocated tothe process 410 and processing of the calculation. When the contextswitching is performed, the CPU may be allocated to another device for aperiod of time corresponding to Tw to process the calculation, and adriver context of an input/output device may process an input/outputrequest for a period of time corresponding to Tb. Accordingly, when theinput/output device performs the context switching without using theDMA, the CPU effectiveness may be expressed by the following Equation 4:

$\begin{matrix}{E_{cs} = \frac{T_{w} + T_{b}}{T_{w} + T_{b} + {2 \cdot T_{c}} - T_{v}}} & \lbrack {{Equation}\mspace{14mu} 4} \rbrack\end{matrix}$

When the input/output is directly performed, the CPU may need to waitfor a period of time corresponding to Tw until an interrupt is receivedfrom the input/output device. Therefore, the standby time may not beincluded in Tr. Only Tb where the input/output is executed may beincluded in Tr. Accordingly, when the input/output is directlyperformed, the CPU effectiveness may be expressed by the followingEquation 5:

$\begin{matrix}{E_{acs} = \frac{T_{b}}{T_{w} + T_{b} - T_{v}}} & \lbrack {{Equation}\mspace{14mu} 5} \rbrack\end{matrix}$

Here, a criterion to determine whether to directly perform theinput/output when the DMA is not used may include an excellentperformance in an aspect of the input/output response time. In an aspectof the CPU effectiveness, for example, the input/output may be directlyperformed when the following Equation 6 is satisfied, Equation 6 beinggiven by:E _(acs) >E _(cs)  [Equation 6]

The CPU effectiveness when the DMA is used may be calculated to bedifferent from the CPU effectiveness when the DMA is not used. When theDMA is used, it may be classified into a case where the CPU directlyperforms the input/output in a process context, or into a case where theDMA is used after the context switching to the driver context of theinput/output device is performed. In an aspect of the input/outputresponse time, to perform the input/output without performing thecontext switching may not use a time used for the context switching andthus be more advantageous. However, in an aspect of the CPUeffectiveness, when the context switching is performed, it is possibleto process both Tw and Tb using the DMA. During the above period oftime, the scheduler may allocate the CPU to another process.Accordingly, it is possible to utilize an amount of time correspondingto twice an amount of time of Tw+Th. Accordingly, when the contextswitching is performed by using the DMA, the CPU effectiveness may beexpressed by the following Equation 7:

$\begin{matrix}{E_{{cs}\_{dma}} = \frac{( {T_{w} + T_{b}} ) \cdot 2}{T_{w} + T_{b} + {2 \cdot T_{c}} - T_{v}}} & \lbrack {{Equation}\mspace{14mu} 7} \rbrack\end{matrix}$

When the process having requested the input/output performs theinput/output without attempting the context switching, the CPUeffectiveness may be expressed the same as in the above Equation 5.Therefore, when the process directly performs the input/output using theDMA, the CPU effectiveness may be expressed by the following Equation 8:

$\begin{matrix}{E_{a{cs}\_{dma}} = \frac{T_{b}}{T_{w} + T_{b} - T_{v}}} & \lbrack {{Equation}\mspace{14mu} 8} \rbrack\end{matrix}$

Accordingly, when the process directly performs the input/output usingthe DMA, the CPU effectiveness may be expressed by the followingEquation 9:E _(acs) _(—) _(dma) >E _(cs) _(—) _(dma)  [Equation 9]

The aforementioned schemes of calculating the input/output response timeand the CPU effectiveness are only examples and thus it is possible tocalculate the input/output response time and the CPU effectiveness usingvarious types of schemes and equations.

Accordingly, the adaptive context switching may classify whether the DMAis used, whereby the process having requested the input/output maydirectly perform the input/output when the above Equation 6 or Equation9 is satisfied.

Here, the process having requested the input/output may directly performthe input/output only when a request in a response standby state doesnot exist in a queue of the input/output device. Specifically, when therequest exists, the process may perform the context switching.

Referring again to FIG. 1, in operation S130, the process may performthe input/output based on the comparison result. Specifically, when theCPU effectiveness according to the first input/output operation isgreater than the CPU effectiveness according to the second input/outputoperation, the process may perform the first input/output operation.When the CPU effectiveness according to the second input/outputoperation is greater than the CPU effectiveness according to the firstinput/output operation, the process may perform the second input/outputoperation.

Also, operation S130 may include determining whether a request in aresponse standby state exists in a queue of the input/output deviceexists, and performing the input/output through the context switching tothe driver context of the input/output device when the request exists.Specifically, only when the response in the response standby state doesnot exist in the queue of the input/output device, may the adaptivecontext switching scheme be performed. When the request exists in thequeue of the input/output device, the input/output may be performed onlythrough the context switching.

Also, the adaptive context switching method may further includedetermining whether the input/output device corresponds to a fast blockdevice. When the input/output device corresponds to the fast blockdevice, operations S110 through S130 may be performed.

According to an embodiment of the present invention, when a processexecutes an input/output, whether a context switching is performed maybe determined based on a CPU effectiveness. Through this, it is possibleto enhance a use effectiveness of a CPU, and to obtain a quick responsetime.

FIG. 2 is a flowchart illustrating a process of performing aninput/output process based on whether a context switching is performedaccording to an embodiment of the present invention.

Referring to FIG. 2, in operation S210, a process may request aninput/output of data.

In operation S220, the process may register the input/output in a blockinput/output structure in a kernel mode.

In operation S230, the process may merge the input/output with aninput/output waiting in a current device or change a sequence theinput/output in order to decrease a motion of a head of a disk drive. Tohandle the input/output as above may be performed using an elevatoralgorithm, and may be performed based on a Logical Block Address (LBA)on a system side.

In operation S240, the process having requested the input/output maydetermine whether to perform the input/output directly or through thecontext switching. At least one of an input/output response time and aCPU effectiveness may be considered to determine whether to perform theinput/output directly or through the context switching.

In operation S250, when the process having requested the input/outputdetermines to directly perform the input/output, the process maydirectly process the input/output.

Conversely, when the process having requested the input/outputdetermines to perform the input/output through the context switchinginstead of directly processing the input/output, the process may beswitched to an unplug and sleep state in operation S260, and may call aninput/output scheduler in operation S270. In this instance, the contextswitching from a process context to a device driver context may occur.

In operation S280, a device driver may process the input/output one byone until all the input/output is completed. When the input/output iscompleted, the context switching may occur again and the input/outputscheduler may wake the process in the sleep state.

Specifically, a system performance may be enhanced by selectivelydetermining whether the context switching is performed based on theinput/output response time and the CPU effectiveness.

FIG. 5 is a block diagram illustrating a configuration of an apparatusfor an adaptive context switching for a fast block input/outputaccording to an embodiment of the present invention. FIG. 6 is a blockdiagram illustrating a configuration of a CPU effectiveness comparisonunit of FIG. 5.

Referring to FIG. 5, the adaptive context switching apparatus mayinclude an input/output request unit 510, a CPU effectiveness comparisonunit 520, and an input/output performing unit 530. The adaptive contextswitching apparatus may further include a DMA utilization verifying unit(not shown).

A process may request an input/output device (not shown) to perform aninput/output, using the input/output request unit 510.

The DMA utilization verifying unit may verify whether the input/outputdevice uses a DMA.

The CPU effectiveness comparison unit 520 may compare a CPUeffectiveness based on whether the context switching is performed.Hereinafter, a configuration of the CPU effectiveness comparison unit520 will be further described.

Referring to FIG. 6, the CPU effectiveness comparison unit 520 mayinclude a CPU effectiveness calculation unit 610 and an effectivenesscomparison unit 620.

A first CPU effectiveness calculation unit 611 may calculate the CPUeffectiveness according to a first input/output operation where theprocess having requested the input/output directly performs theinput/output, and the CPU effectiveness according to a secondinput/output operation where the input/output is performed through thecontext switching to the driver context of the input/output device, whenthe input/output device does not uses a DMA. A second CPU effectivenesscalculation unit 612 may calculate the CPU effectiveness according tothe first input/output operation and the CPU effectiveness according tothe second input/output operation, when the input/output device uses theDMA. The first CPU effectiveness calculation unit 611 and the second CPUeffectiveness calculation unit 612 may be included in the CPUeffectiveness calculation unit 610.

The effectiveness comparison unit 620 may compare the CPU effectivenessaccording to the first input/output operation and the CPU effectivenessaccording to the second input/output operation. Specifically, based onwhether the input/output device uses the DMA, the effectivenesscomparison unit 620 may compare the CPU effectiveness calculated whenthe process directly performs the input/output, with the CPUeffectiveness calculated when the process performs the input/outputthrough the context switching.

Referring again to FIG. 5, the input/output performing unit 530 mayperform the input/output based on the comparison result. Specifically,the process having requested the input/output may perform theinput/output directly or through the context switching based on thecomparison result of the CPU effectiveness.

Since the context switching is selectively performed in the input/outputof data in order to further effectively use a main CPU according to achange of hardware, it is possible to more adaptively cope with thechange of hardware, and to enhance a system performance.

In computing-based embedded systems, for example, a television (TV), aportable multimedia player (PMP), an ultra mobile PC (UMPC), a notebook,and the like, when a context switching is performed every time aninput/output request is received, overload may occur in loading a smallamount of data. Also, a booting time may increase. Accordingly, abooting time may decrease in a computing-based system by selectivelyperforming the context switching.

Although a few embodiments of the present invention have been shown anddescribed, the present invention is not limited to the describedembodiments. Instead, it would be appreciated by those skilled in theart that changes may be made to these embodiments without departing fromthe principles and spirit of the invention, the scope of which isdefined by the claims and their equivalents.

The invention claimed is:
 1. A method for adaptive context switchingwithin an apparatus comprising a Central Processing Unit (CPU), themethod comprising: requesting, by a process executing within the CPU, aninput/output device to perform an input/output of data; calculating afirst effectiveness of the CPU, where context switching to a drivercontext of the input/output device is performed, the calculation beingdifferent based on whether or not the device use Direct Memory Access(DMA), the first effectiveness of the CPU including an amount of timeallocated to the driver context of the input/output device; calculatinga second effectiveness of the CPU, where no context switching isperformed and the input/output is directly performed by the process, thesecond effectiveness of the CPU including an amount of time the CPU isallocated to the process; comparing the first effectiveness of the CPUto the second effectiveness of the CPU; selecting a way to perform theinput/output between performing the context switching to a drivercontext of the input/output device, and directly performing, by theprocess, the input/output based on a result of the comparison of thefirst effectiveness of the CPU and the second effectiveness of the CPU;and performing the input/output using the selected way.
 2. The method ofclaim 1, further comprising: determining whether the input/output devicecorresponds to a fast block device, and calculating the firsteffectiveness and the second effectiveness based on that determination.3. The method of claim 1, wherein the performing of the input/outputcomprises performing the first input/output operation when the firsteffectiveness according to the first input/output operation is greaterthan the second effectiveness according to the second input/outputoperation, and performing the second input/output operation when thesecond effectiveness according to the second input/output operation isgreater than the first effectiveness according to the first input/outputoperation.
 4. The method of claim 1, wherein, in the first input/outputoperation, the process having requested the input/output directlyperforms the input/output until the input/output is completed.
 5. Themethod of claim 1, wherein the comparing comprises calculating andcomparing the first effectiveness and second effectiveness based on anamount of time used for the input/output, and an amount of time used forallocating the CPU to the process and thereby processing thecalculation.
 6. The method of claim 1, further comprising: verifyingwhether the input/output device uses the Direct Memory Access (DMA). 7.The method of claim 6, wherein the comparing comprises calculating anamount of time the CPU is allocated to the process and processing of thecalculation, using a sum of an amount of response standby time until aninterrupt is received from the input/output device, and an amount oftime allocated to the driver context of the input/output device, whenthe input/output device performs the context switching without using theDMA.
 8. The method of claim 6, wherein the comparing comprisescalculating an amount of time the CPU is allocated to the process andprocessing of the calculation, using an amount of time allocated to thedriver context of the input/output device, when the input/output deviceneither uses the DMA nor performs the context switching.
 9. The methodof claim 6, wherein the comparing comprises calculating an amount oftime the CPU is allocated to the process and processing of thecalculation, using a twice of an amount of time allocated to the drivercontext of the input/output device and an amount of response standbytime until an interrupt is received from the input/output device, whenthe input/output device performs the context switching using the DMA.10. The method of claim 6, wherein the comparing comprises calculatingan amount of time the CPU is allocated to the process and processing ofthe calculation, using an amount of time allocated to the driver contextof the input/output device, when the input/output device uses the DMAand does not perform the context switching.
 11. The method of claim 1,wherein the performing of the input/output comprises: determiningwhether a request in a response standby state exists in a queue of theinput/output device; and performing the input/output through the contextswitching to the driver context of the input/output device when therequest exists.
 12. An apparatus for an adaptive context switching, theapparatus comprising: a Central Processing Unit (CPU); an input/outputrequest unit to request, by a process executing within the CPU, aninput/output device to perform an input/output of data; a calculationunit configured to calculate a first effectiveness of the CPU wherecontext switching to a driver context of the input/output device isperformed, the calculation being different based on whether or not thedevice use Direct Memory Access (DMA), the first effectiveness of theCPU including an amount of time allocated to the driver context of theinput/output device; the calculation unit configured to calculate asecond effectiveness of the CPU, where no context switching is performedand the input/output is directly performed by the process, the secondeffectiveness of the CPU including an amount of time the CPU isallocated to the process; a comparison unit to compare the firsteffectiveness of the CPU to the second effectiveness of the CPU; and aninput/output performing unit to select a way to perform theinput/output, the input/output performing unit selecting betweenperforming the context switching to a driver context of the input/outputdevice, and directly performing, by the process, the input/output basedon a result of the comparison of the first effectiveness and the secondeffectiveness, wherein the input/output performing unit performs theinput/output using the selected way.
 13. The apparatus of claim 12,wherein: when the context switching is performed, the firsteffectiveness calculation unit calculates the amount of time the CPU isallocated to the process and processing of the calculation, using a sumof an amount of response standby time until an interrupt is receivedfrom the input/output device, and an amount of time allocated to thedriver context of the input/output device, and when the contextswitching is not performed, the first effectiveness calculation unitcalculates the amount of time the CPU is allocated to the process andprocessing of the calculation, using the amount of time allocated to thedriver context of the input/output device.
 14. The apparatus of claim12, wherein: when the context switching is performed, the secondeffectiveness calculation unit calculates the amount of time the CPU isallocated to the process and processing of the calculation, using twiceof an amount of time allocated to the driver context of the input/outputdevice and an amount of response standby time until an interrupt isreceived from the input/output device, and when the context switching isnot performed, the second effectiveness calculation unit calculates theamount of time the CPU is allocated to the process and processing of thecalculation, using the amount of time allocated to the driver context ofthe input/output device.
 15. The apparatus of claim 12, furthercomprising: a fast block device decision unit to determine whether theinput/output device corresponds to a fast block device.
 16. Theapparatus of claim 12, wherein: the input/output performing unitcomprises: a response standby decision unit to determine whether arequest in a response standby state exists in a queue of theinput/output device; and when the request exists, the input/outputperforming unit performs the input/output through the context switchingto the driver context of the input/output device.